package com.yiji.fintech.musfinance.common.domain;

import com.yiji.fintech.musfinance.base.enums.*;
import com.yiji.fintech.musfinance.center.sign.order.facade.SignFacadeOrder;
import com.yiji.fintech.musfinance.common.annotation.ChannelContext2Domain;
import com.yiji.fintech.musfinance.common.annotation.Field2Filed;
import com.yiji.fintech.musfinance.common.annotation.Order2Domain2Event;
import com.yiji.fintech.musfinance.common.annotation.RuleStrategyAnnotation;
import com.yiji.fintech.musfinance.common.domain.base.BaseDomain;
import com.yiji.fintech.musfinance.common.eventbus.event.SignEvent;
import com.yiji.fintech.musfinance.common.strategy.converter.Context2SignDomainStrategy;
import com.yiji.fintech.musfinance.common.strategy.enginerules.SignRulesStrategy;
import com.yiji.fintech.musfinance.service.TransactionSignService;
import lombok.Data;

import java.util.Date;

/**
 * Created by ouwen@yiji.com} on 2017/9/27.
 */
@Order2Domain2Event(eventClass = SignEvent.class,
        orderClass = SignFacadeOrder.class,
        dbServiceClass = TransactionSignService.class)
@RuleStrategyAnnotation(strategyClass = SignRulesStrategy.class)
@ChannelContext2Domain(c2dsClass = Context2SignDomainStrategy.class)
@Data
public class SignDomain extends BaseDomain {
    /** 账户名 对私：用户姓名/对公：公司名称*/
    private String accountName;
    /** 证件号码 对私：身份证号/对公：营业执照号*/
    private String certNo;
    /**银行账号*/
    private String accountNo;
    /**电话号码*/
    private String phoneNo;
    /**银行编码*/
    @Field2Filed(toFiled = "instBankId")
    private String bankId;
    /** 付款-对公:CORPORATE / 对私:PERSONAL默认对私*/
    @Field2Filed(toFiled = "personalCorporateType")
    private PersonalCorporateTypeEnum accountType = PersonalCorporateTypeEnum.PERSONAL;
    /**省份 -对公必传*/
    private String province;
    /**城市 -对公必传*/
    private String city;
    /** 银行名称 */
    private String bankName;
    /** 通知状态 */
    private NotifyStatusEnum notifyStatus = NotifyStatusEnum.NO;
    /** 合同号 */
    private String contractNo;
    /** 发送网关时间 */
    private Date gatewayTime;
}
